package Model
{
	[Bindable]
	public class ProjectInfo
	{
		private var _object:ContactInfo;
		private var _builder:ContactInfo;
		private var _architect:ContactInfo;
		private var _notes:String;
		private var _climateZone:ClimateZone;
		private var _typeConstruction:String;
		private var _buildingType:String;
		private var _usage:String;
		private var _interiorTemperature:Number;
		
		public var requiredDataIsEntered:Boolean = false;
		public var dataIndicatorSource:String = "img/red-check.png";
		
		public function ProjectInfo()
		{
			this._object = new ContactInfo();
			this._builder = new ContactInfo();
			this._architect = new ContactInfo();
			this._notes = "";
			this._climateZone = new ClimateZone();
			this._typeConstruction = "New Building";
			this._buildingType = "Residential";
			this._usage = "For living";
			this._interiorTemperature = 20;
		}
		
		
		public function get object():ContactInfo
		{
			return _object;
		}

		public function set object(value:ContactInfo):void
		{
			_object = value;
		}

		public function get builder():ContactInfo
		{
			return _builder;
		}

		public function set builder(value:ContactInfo):void
		{
			_builder = value;
		}

		public function get architect():ContactInfo
		{
			return _architect;
		}

		public function set architect(value:ContactInfo):void
		{
			_architect = value;
		}

		public function get notes():String
		{
			return _notes;
		}

		public function set notes(value:String):void
		{
			_notes = value;
		}

		public function get climateZone():ClimateZone
		{
			return _climateZone;
		}

		public function set climateZone(value:ClimateZone):void
		{
			_climateZone = value;
		}

		public function get typeConstruction():String
		{
			return _typeConstruction;
		}

		public function set typeConstruction(value:String):void
		{
			_typeConstruction = value;
		}

		public function get buildingType():String
		{
			return _buildingType;
		}
	
		public function set buildingType(value:String):void
		{
			_buildingType = value;
		}

		public function get usage():String
		{
			return _usage;
		}

		public function set usage(value:String):void
		{
			_usage = value;
		}

		public function get interiorTemperature():Number
		{
			return _interiorTemperature;
		}

		public function set interiorTemperature(value:Number):void
		{
			_interiorTemperature = value;
		}
		
		public function checkIfRequiredDataIsEntered():Boolean
		{
			if(this.object.requiredDataisEntered() && this.climateZone.requiredDataIsEntered())
			{
				return true;
			}
			else
			{
				return false;
			}
		}
	}
}